import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-10-19  09:08
 */
public class Test2 {
    public static void main(String[] args) {
        int[] ary = {1,2,3,4,5,6,7,8,9,10};
        int left = 0;
        int right = ary.length - 1;
        while(left < right) {
            int temp = ary[left];
            ary[left] = ary[right];
            ary[right] = temp;
            left++;
            right--;
        }
        System.out.println(Arrays.toString(ary));
    }
}
